const express=require('express');
const router=express.Router();
const jwt= require('../utils/jwt')
const query = require('../mysql')
router.get('/getCard',jwt.auth, function(req,res){
        var  sql = `SELECT * FROM my_card`;
        console.log(req.user,'接口');
        query(sql,function (err,result,) {
            if(err){ //sql 语句报错
                console.log(err.message);
                res.send({code:202,data:err,msg:"错误"})
                return;
            }
            if(result.length==0){
                res.send({code:201,data:result,msg:"ok"})
            }else{
                res.send({code:200,data:result,msg:"ok"})
            }
        })
});
router.get('/delCard',jwt.auth,function(req,res){

})

module.exports = router
